import 'package:color_dart/color_dart.dart';
import 'package:flutter/material.dart';
import 'package:im_flutter_sdk_example/utils/custom_appbar.dart';
import 'package:im_flutter_sdk_example/utils/global.dart';

import 'widgets/message_item.dart';

class Message extends StatefulWidget {
  static _MessageState _messageState;

  getAppBar() => _messageState.createAppBar();

  Message() {
    _messageState = _MessageState();
  }

  _MessageState createState() => _MessageState();
}

class _MessageState extends State<Message> {
  AppBar createAppBar() {
    return null;
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: hex('#fff'),
      appBar: customAppbar(
        title: '通知',
        context: null,
      ),
      body: Container(
        decoration: BoxDecoration(
          border: G.borderTop(),
        ),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Expanded(
              child: SingleChildScrollView(
                child: Column(
                  children: [
                    MessageItem(),
                    MessageItem(),
                    MessageItem(),
                    MessageItem(),
                    MessageItem(),
                    MessageItem(),
                  ],
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
}
